<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/table.css" />" />
<link rel="stylesheet" type="text/css"
	href="<c:url value="/resources/css/button.css" />" />


<title>Quản lý nhóm sản phẩm</title>
</head>
<body>
<div align="center" style="height: 400px">
    <h1 style="color: blue;">QUẢN LÝ NHÓM SẢN PHẨM</h1>
	<table class="table1" id="categorytable">
						<tr>

							<th scope="col" abbr="Starter">Mã nhóm dược phẩm</th>
							<th scope="col" abbr="Starter">Tên nhóm </th>
							<th scope="col" abbr="Starter">Số dược phẩm</th>
							<th scope="col" abbr="Starter"></th>
							<th scope="col" abbr="Starter"></th>
						</tr>
				
							<c:forEach items="${listAllCategories.categoryDTOs}" var="category"
								varStatus="status">
								<tr class="<c:if test="${status.count % 2 == 0}">even</c:if>">

									<td>${category.id}</td>
									<td>${category.categoryName}</td>
									<td>${category.numberMedicine}</td>
									<td><a
										href="#" onclick="updateCategory(${category.id})">
											<img src="<c:url value="/resources/images/edit-icon.png"/>" /></a
											></td>
											<td><a href="#" onclick="deleteCategory(${category.id})">
											<img src="<c:url value="/resources/images/delete-icon1.png"/>" />
											</a
											></td>
								</tr>
							</c:forEach>
				
					</table>
					<div id="categorypaging"></div>
					<script type="text/javascript">
						var pager = new Pager('categorytable', 7);
						pager.init();
						pager.showPageNav('pager', 'categorypaging');
						pager.showPage(1);
					</script>
					<a href="#"><input class="button"
									id="addcategory" type="button" value="Thêm"></a>
					</div>
</body>
</html>